home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WWTCLKit / NIBNameMatrix.m < prev    next >
Encoding:
Text File  |  1995-03-22  |  859 b   |  45 lines

  1.  
  2. #import "NIBNameMatrix.h"
  3.  
  4. // so it knows about ok:
  5. #import <apps/InterfaceBuilder.h>
  6.  
  7. @implementation NIBNameMatrix
  8.  
  9. - (BOOL)acceptsFirstResponder { return YES; }
  10.  
  11. - cut:sender
  12. {
  13.   id    aCell, aList = nil;
  14.   int   row, col, i;
  15.  
  16.  
  17.   if (![self cellCount])
  18.   {  return self;
  19.   }
  20.   aList = [[List alloc] init];
  21.   [self getSelectedCells:aList];
  22.   if ([aList count])
  23.   {  for (i = 0; i < [aList count]; i++)
  24.      {  aCell = [aList objectAt:i];
  25.         [self getRow:&row andCol:&col ofCell:aCell];
  26.         [self removeRowAt:row andFree:YES];
  27.      }
  28.   }
  29.   else
  30.   {  aCell = [self selectedCell];
  31.      [self getRow:&row andCol:&col ofCell:aCell];
  32.      [self removeRowAt:row andFree:YES];
  33.   }
  34.   [self sizeToCells];
  35.   [self display];
  36.   [aList free];
  37.   [theInspector ok:self];
  38.   
  39.   return self;
  40. }
  41.  
  42. - setTheInspector:sender { theInspector = sender; return self; }
  43.  
  44. @end
  45.